﻿Public Class frmNewSupplier

    Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click
        Dim s = "New Supplier"
        If txtname.Text.Trim = "" Then
            myMsgbox.show("Name cannot be empty!!", s)
            txtname.Focus()
            txtname.SelectAll()
            Exit Sub
        End If
        If txtphone.Text.Trim = "" Then
            myMsgbox.show("Phone cannot be empty!!", s)
            txtphone.Focus()
            txtphone.SelectAll()
            Exit Sub
        End If

        ClassSupplier.addSupplier(txtname.Text, txtphone.Text, txtaddress.Text, txtnote.Text)
    End Sub
End Class